/*
 * Copyright 2009 Biz-e (info@biz-e.nl)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.biz_e.appengine.lib.client.services;

import nl.biz_e.appengine.lib.shared.login.GoogleLoginInfo;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * This service provides a mechanism to authenticate a user against
 * his/her Google account. This can be a normal GMail account or any
 * Google Apps account.<br/>
 * <br/>
 * To use this service, enable it by configuring the servlet in the
 * web.xml of your application, by adding:
 * 
 * <pre>
 * &lt;servlet>
 *      &lt;servlet-name>googleLoginService&lt;/servlet-name>
 *      &lt;servlet-class>nl.biz_e.appengine.lib.server.login.GoogleLoginServiceImpl&lt;/servlet-class>
 *  &lt;/servlet>
 *  &lt;servlet-mapping>
 *      &lt;servlet-name>googleLoginService&lt;/servlet-name>
 *      &lt;url-pattern>/{appname}/googlelogin&lt;/url-pattern>
 *  &lt;/servlet-mapping>
 *  </pre>
 * 
 * @author Joost A. Bloemsma
 */
@RemoteServiceRelativePath("googlelogin")
public interface GoogleLoginService extends RemoteService {
    /**
     * Do the actual login, and return a {@link GoogleLoginInfo} object as a
     * result
     * 
     * @param requestUri
     * @return the resulting {@link GoogleLoginInfo} object
     */
    public GoogleLoginInfo login(String requestUri);
}
